]> dgit.raspbian.org Git - gnome-shell.git/commit
st: Fix closure annotations
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 6 Nov 2024 13:46:31 +0000 (14:46 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 6 Nov 2024 13:59:43 +0000 (14:59 +0100)
commit411fe9c42f1e4617ddbdd5207998b67abe036806
tree4da40ef41c98ed10e05669177ae3f77bb56915ca
parentd92f8daf62ab5a9d1c02f82701d74a9f87ae01ee
st: Fix closure annotations

Quoting Ebassi https://www.bassi.io/articles/2023/02/20/bindable-api-2023/:

    Whenever you’re describing a function that takes a callback, you
    should always annotate the callback argument with the argument that
    contains the user data using the (closure argument) annotation

    You should not annotate the data argument with a unary (closure).

    The unary (closure) is meant to be used when annotating the callback
    type

Recently gobject-introspection became a bit more strict with this and
that generated some warnings:

    Warning: St: invalid "closure" annotation: only valid on callback
    parameters

This commit fix all the closure annotations.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3535>
src/st/st-icon-theme.c